//设置请求获取医院列表的『参数类型』
export interface ReqHospitalListParams {
  page: number;
  limit: number;
  hoscode?: string;
  hosname?: string;
  hostype?: string;
  provinceCode?: string;
  cityCode?: string;
  districtCode?: string;
}

export interface HospitalBase {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: {
    hostypeString: string;
    fullAddress: string;
  };
  hoscode: string;
  hosname: string;
  hostype: string;
  provinceCode: string;
  cityCode: string;
  districtCode: string;
  address: string;
  logoData: string;
  intro: string;
  route: string;
  status: 0 | 1;
}
export interface HospitalItem extends HospitalBase {
  bookingRule: BookingRule;
}
interface BookingRule {
  cycle: number;
  releaseTime: string;
  stopTime: string;
  quitDay: number;
  quitTime: string;
  rule: string[];
}

export interface HospitalShow {
  bookingRule: BookingRule;
  hospital: HospitalBase;
}
export type HospitalItems = HospitalItem[];

export interface ReqHospitalListResponse {
  content: HospitalItems;
  pageable: {
    sort: {
      sorted: boolean;
      unsorted: boolean;
      empty: boolean;
    };
    pageNumber: number;
    pageSize: number;
    offset: number;
    paged: boolean;
    unpaged: boolean;
  };
  totalPages: number;
  totalElements: number;
  last: boolean;
  first: boolean;
  sort: {
    sorted: boolean;
    unsorted: boolean;
    empty: boolean;
  };
  numberOfElements: number;
  size: number;
  number: number;
  empty: boolean;
}

//省份接口

export interface provinceItem {
  id: number;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  parentId: number;
  name: string;
  value: string;
  dictCode: null;
  hasChildren: boolean;
}

export type provinceItems = provinceItem[];

//科室接口

export interface Department {
  depcode: string;
  depname: string;
  children: null|Departments;
}

export type Departments=Department[];

//设置排班规则的参数
export interface reqSetHospitalScheduleParams{
  page:number,
  limit:number,
  hoscode:string,
  depcode:string
}
//排班信息
export interface ScheduleRule {
  workDate: string; // 排班日期
  workDateMd: null; //
  dayOfWeek: string;//星期
  docCount: number; //医生的数量
  reservedNumber: number; // 总的预约号数
  availableNumber: number;//  可用的预约号数
  status: null; //状态
}

export type ScheduleRules=ScheduleRule[];

//排班响应信息

export interface ScheduleRuleResponse{
  total:number,
  bookingScheduleList:ScheduleRules,
  baseMap:{
    hosname:string
  }
}

//设置详细排班信息的请求参数
export interface reqScheduleDetailParams{
  hoscode:string,
  depcode:string,
  workDate:string
}

export interface HospitalScheduleItem {
  id: string; // ID
  createTime: string; //创建时间
  updateTime: string; // 更新时间 
  isDeleted: number;//是否删除
  param: { //额外信息
    dayOfWeek: string;
    depname: string;
    hosname: string;
  };
  hoscode: string;//医院编号
  depcode: string;//部门编号
  title: string;//职称
  docname: string; //医生的名字
  skill: string; //擅长技术
  workDate: string; //工作日期
  workTime: number; //上班时间
  reservedNumber: number; // 总的预约数
  availableNumber: number; //可用的预约数
  amount: number; // 价格
  status: number; //状态
  hosScheduleId: string; //id
}

//复数
export type HospitalScheduleResponse = HospitalScheduleItem[];

